package com.hongdee.crm.contact.service;

import com.github.pagehelper.PageInfo;
import com.hongdee.crm.contact.entity.TCrmCarContact;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;

import java.util.List;
import java.util.Map;

/**
 * Created by My on 2017/2/28.
 */
public interface ITCrmCarContactService {
    /**
     *
     * @param page
     * @param limit
     * @param data
     * @param uid
     * @return
     * @throws Exception
     */
    public PageInfo page(int page, int limit, Map data, String uid) throws Exception;

    /**
     * 保存任务维系并求助并保存信息
     * @param data
     * @param oid
     * @param uid
     * @throws Exception
     */
    public void seekHelpSave(Map data, String oid, String uid) throws Exception;

    /**
     * @param data 实体
     * @return TCrmCarContact
     * @throws Exception
     * @desc 维护记录保存或修改
     * @author 徐钦勇
     */
    public void saveOrUpdate(Map data, String oid, String uid) throws Exception;

    /**
     * @param data 实体
     * @return TCrmCarContact
     * @throws Exception
     * @desc 维护记录保存或修改
     * @author 徐钦勇
     */
    public void close(Map data, String oid, String uid) throws Exception;

    /**
     * @param
     * @return Map
     * @throws Exception
     * @desc 维系明细
     * @author 徐钦勇
     */
    public List info(String plateNum, String vin, String oid) throws Exception;

    /**
     * 查询出车辆客户标签
     */
    public List UserTag(String vin) throws Exception;

    /**
     * 查询出车辆客户标签,同时获取标签名称信息
     */
    public List UserTagByVin(String uid,String vin) throws Exception;
    /**
     * 根据查询结果导出excel
     * */

    public XSSFWorkbook exportContact(Map data, String uid) throws Exception;


    /**
     * 车辆流失分析
     * @param uid
     * @param data
     * @return
     * @throws Exception
     */
    public List<Map<String,Object>> carLossMonthStatistics(String uid,Map<String,Object> data)throws Exception;

    /**
     * 车辆流失分析明细查询
     * @param uid
     * @param data
     * @return
     * @throws Exception
     */
    public Map<String,Object> carLossMonthStatisticsDetail(String uid,Map<String,Object> data,String start,String limit)throws Exception;

    /**
     * 查询车辆流失分析明细导出Excel
     * @param uid
     * @param data
     * @return
     * @throws Exception
     */
    public XSSFWorkbook exportExcelBycarLossMonthStatistics(String uid, Map<String,Object> data) throws Exception;
    /**
     * 获取录音文件路径
     * @param uid
     * @param id
     * @return
     * @throws Exception
     */
    public Map getRecordAddress(String uid ,String id )throws Exception;

}
